import type { RouteRecordRaw } from 'vue-router';

import { BasicLayout } from '#/layouts';
import { $t } from '#/locales';

const routes: RouteRecordRaw[] = [
  {
    component: BasicLayout,
    meta: {
      icon: 'ic:baseline-view-in-ar',
      order: 1,
      title: $t('page.activity.title'),
    },
    name: 'Activity',
    path: '/activity',
    children: [
      {
        name: 'ActivityList',
        path: '/activity/index',
        component: () => import('#/views/activity/index.vue'),
        meta: {
          title: $t('page.activity.list'),
        },
      },
      {
        name: 'ActivityDetail',
        path: '/activity/detail/:id',
        component: () => import('#/views/activity/detail.vue'),
        meta: {
          activePath: '/activity',
          hideInMenu: true,
          maxNumOfOpenTab: 3,
          title: $t('page.activity.detail'),
        },
      },
      {
        name: 'ActivityEdit',
        path: '/activity/edit/:id',
        component: () => import('#/views/activity/edit.vue'),
        meta: {
          activePath: '/activity',
          hideInMenu: true,
          maxNumOfOpenTab: 3,
          title: $t('page.activity.edit'),
        },
      },
      {
        name: 'ActivityCreate',
        path: '/activity/create',
        component: () => import('#/views/activity/create.vue'),
        meta: {
          activePath: '/activity',
          hideInMenu: true,
          maxNumOfOpenTab: 3,
          title: $t('page.activity.create'),
        },
      },
      {
        name: 'SignUp',
        path: '/activity/signUp',
        component: () => import('#/views/activity/signUp.vue'),
        meta: {
          activePath: '/activity',
          hideInMenu: true,
          title: $t('page.activity.signUp'),
        },
      },
    ],
  },
];

export default routes;
